package com.hm.base.def;

import com.hm.common.util.CommonUtil;

/**
 * @author shishun.wang
 * @date 下午12:02:48 2017年8月24日
 * @version 1.0
 * @describe
 */
public enum ScheduleJobStatusEnum {

	ENABLE("ENABLE","启用"),
	
	PAUSE("PAUSE","暂停"),

	DISABLE("DISABLE", "禁用");

	private String status;

	private String desc;

	private ScheduleJobStatusEnum(String status, String desc) {
		this.status = status;
		this.desc = desc;
	}

	public String desc() {
		return this.desc;
	}

	public String status() {
		return this.status;
	}

	public static ScheduleJobStatusEnum trance(String status) {
		if (CommonUtil.isEmpty(status)) {
			return null;
		}
		
		for (ScheduleJobStatusEnum enumTmp : ScheduleJobStatusEnum.values()) {
			if (enumTmp.status.equals(status)) {
				return enumTmp;
			}
		}
		return null;
	}
}
